#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int MOD = 998244353;
const int N = 2010;

int gcd(int a, int b)
{
    return b ? gcd(b, a % b) : a;
}

ll qui(ll a, ll b)
{
    ll res = 1;
    while (b)
    {
        if (b & 1)
            res = res * a % MOD;
        b >>= 1;
        a = a * a % MOD;
    }
    return res;
}

ll fac[N], inv_fac[N];
ll S[N][N];

void init()
{
    fac[0] = 1;
    for (int i = 1; i < N; i++)
        fac[i] = fac[i - 1] * i % MOD;
    inv_fac[N - 1] = qui(fac[N - 1], MOD - 2);
    for (int i = N - 1; i > 0; i--)
        inv_fac[i - 1] = inv_fac[i] * i % MOD;
    S[0][0] = 1;
    for (int i = 1; i < N; ++i)
    {
        for (int j = 1; j < N; ++j)
        {
            S[i][j] = (j * S[i - 1][j] % MOD + S[i - 1][j - 1]) % MOD;
        }
    }
}

ll comb(int a, int b)
{
    return fac[a] * inv_fac[b] % MOD * inv_fac[a - b] % MOD;
}

void solve() {
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for(int i = 0; i < n; i++) cin >> a[i];
    map<int, int> memo;
    memo[(1 << n) - 1] = 1;
    auto dfs = [&](auto&& dfs, int mask, int t) ->ll{
        if(memo[mask]) {
            return memo[mask];
        }
        ll ans = 0;
        for(int i = 0; i < n; i++) {
            if(!((mask >> i) & 1) && a[i] <= t) {
                ans = (ans + dfs(dfs, mask | (1 << i), t + a[i])) % MOD;
            }
        }
        return memo[mask] = ans;
    };
    cout << dfs(dfs, 0, k);
}

int main()
{
    int t = 1;
    while (t--)
        solve();
    return 0;
}